using System;
using System.Configuration;
using System.Web.Caching;

namespace IFXplus.SmartStorage.Settings
{
    public class AspNetCacheStorageProviderSettings : BaseStorageProviderSettings
    {
        
        #region StorageProviderType

        public override StorageProviderType Type
        {
            get { return StorageProviderType.AspNetCache; }
        }
        
        #endregion

        [ConfigurationProperty("slidingExpiration", DefaultValue = "00:30:00", IsKey = false, IsRequired = true)]
        public TimeSpan SlidingExpiration 
        {
            get { return (TimeSpan)base["slidingExpiration"]; }
            set { base["slidingExpiration"] = value; }
        }

        [ConfigurationProperty("priority", DefaultValue = "Default", IsKey = false, IsRequired = true)]
        public CacheItemPriority Priority
        {
            get { return (CacheItemPriority)base["priority"]; }
            set { base["priority"] = value; }
        }
    }
}
